package com.sinosoft.tcmcp.system.web.dto;

import java.io.Serializable;
import java.util.List;

import com.sinosoft.framework.core.api.domain.DictEntity;
import com.sinosoft.framework.core.api.domain.DictitemEntity;
import com.sinosoft.framework.core.common.utils.ajax.ObjectUtil;

/**
 * 字典信息传输类
 * @author xiaoxiong
 *
 */
public class DictData implements Serializable{

	private static final long serialVersionUID = 1L;
	
	private String id;	//	字典编号
	
	private String name;	//	字典名称
	
	private String aid;	//	应用编号
	
	private String type;	//	字典类型
	
	private String pym;	//	拼音码
	
	private String description;	//	描述
	
	private int sort;	//	排序
	
	private List<DictitemEntity> items;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAid() {
		return aid;
	}

	public void setAid(String aid) {
		this.aid = aid;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getPym() {
		return pym;
	}

	public void setPym(String pym) {
		this.pym = pym;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public int getSort() {
		return sort;
	}

	public void setSort(int sort) {
		this.sort = sort;
	}

	public List<DictitemEntity> getItems() {
		return items;
	}

	public void setItems(List<DictitemEntity> items) {
		this.items = items;
	}

	/**
	 * 数据转换
	 * 实体类转传输类
	 * @return	字典数据实体
	 */
	public DictEntity toDictEntity(){
		DictEntity DictEntity = new DictEntity();
		ObjectUtil.oldToNew(DictEntity, this, "serialVersionUID");
		return DictEntity;
	}
	
	/**
	 * 数据转换
	 * 传输类转实体类
	 * @param DictEntity	字典实体
	 */
	public void toDictData(DictEntity DictEntity){
		ObjectUtil.oldToNew(this, DictEntity, "serialVersionUID");
	}
}
